<%@ page contentType="text/html;charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="${ctx}/gzcgwsp/qyzz/YwRqQyzzInfo/js/stateGrid.js" type="text/javascript"></script>
<script type="text/javascript">
Ext.onReady(function(){
   showOtherInfo();
   
});




	//显示其他信息
function showOtherInfo(){
 var acceptNo=document.getElementById("acceptNo").value;
  var id=document.getElementById("id").value;
  if(acceptNo!="" && id!=""){
  	var store = new Ext.data.JsonStore({
        totalProperty: 'totalCount',
		root: 'result',
        idProperty: 'id',
        remoteSort: true,
        fields: [
            'name', 
            'idCard', 
            'jszc', 
            'zsbh',
            'fzbm'
        ],
        proxy: new Ext.data.HttpProxy({
            url: '${ctx}/yw-rq-qyzz-js-ry!toList.action?acceptNo='+acceptNo
        })
    });
    

    //分页显示企业专业人员数据
    var grid = new Ext.grid.GridPanel({
        autoFill : false,
        el:'zypersondiv',
        collapsible : true,// 是否可以展开 
       
        autoHeight : true,
        width:750,//宽度
        title:'企业专业技术人员',
        store: store,//数据
        trackMouseOver:false,
        disableSelection:true,
        //加载的图标是否显示
        loadMask: true,
        //单行选中
        sm: new Ext.grid.CheckboxSelectionModel ({ singleSelect: false }),//复选框
        // grid columns列
        columns:[
        //new Ext.grid.CheckboxSelectionModel({singleSelect : false}),//复选框
        new Ext.grid.RowNumberer(),//序号
        {
            id: 'name', 
            header: "姓名",
            dataIndex: 'name',
            width:70,
            //align: 'center',
            sortable: false
        },{
            header: "身份证",
             width:160,
            dataIndex: 'idCard',
            //align: 'center',
            sortable: false
        },{
            header: "技术职称",
            dataIndex: 'jszc',
            //align: 'center',
            width:150,
            sortable: false
        },{
            header: "证书编号",
            dataIndex: 'zsbh',
            width:160,
            //align: 'center',
            sortable: false
        },{
            header: "发证部门",
            dataIndex: 'fzbm',
            width:155,
            //align: 'center',
            sortable: false
        }],
        // customize view config
        viewConfig: {
            forceFit:true,//True表示为自动展开/缩小列的宽度以适应grid的宽度，这样就不会出现水平的滚动条。
            enableRowBody:true,//True表示为在每一数据行的下方加入一个TR的元素
            showPreview:true,
            getRowClass : function(record, rowIndex, p, store){                 
                    return 'x-grid3-row-expanded';
                    // return 'x-grid3-row-collapsed';
            }
        },
        // paging bar on the bottom分页按钮
        bbar: new Ext.PagingToolbar({
            pageSize: 10,//每页条数
            store: store,//数据
            displayInfo: true,
            displayMsg: '从{0}条到{1}条  总共 {2}条',
            emptyMsg: "没有数据"
        })
    });
   
    //   加载数据
    store.load({params:{start:0, limit:10}});
    
    //加载安装维修人员的数据
        //安装维修人员
    var azwxstore = new Ext.data.JsonStore({
        totalProperty: 'totalCount',
		root: 'result',
        idProperty: 'id',
        remoteSort: true,
        fields: [
            'name', 
            'idCard', 
            'zyjnzsbh', //职业技能岗位证书编号, 
            'fzDept'
           
        ],
        proxy: new Ext.data.HttpProxy({
            url: '${ctx}/yw-rq-qyzz-az-wxryzs!toList.action?acceptNo='+acceptNo
        })
    });
    var azwxgrid = new Ext.grid.GridPanel({
        autoFill : false,
        el:'azWxpersonDiv',
        collapsible : true,// 是否可以展开 
        autoHeight : true,
        width:750,//宽度
        title:'燃气燃烧器具安装维修人员持证情况',
        store: azwxstore,//数据
        trackMouseOver:false,
        disableSelection:true,
        //加载的图标是否显示
        loadMask: true,
        //单行选中
        sm: new Ext.grid.CheckboxSelectionModel ({ singleSelect: false }),//复选框
        // grid columns列
        columns:[
        //new Ext.grid.CheckboxSelectionModel({singleSelect : false}),//复选框
        new Ext.grid.RowNumberer(),//序号
        {
            id: 'name', 
            header: "姓名",
            dataIndex: 'name',
            width:100,
            sortable: false
        },{
            header: "身份证",
            dataIndex: 'idCard',
            //align: 'center',
            width:200,
            sortable: false
        },{
            header: "职业技能岗位证书编号",
            dataIndex: 'zyjnzsbh',
            width:200,
            //align: 'center',
            sortable: false
        },{
            header: "发证部门",
            dataIndex: 'fzDept',
            width:250,
            //align: 'center',
            sortable: false
        }],
        // customize view config
        viewConfig: {
            forceFit:false,//True表示为自动展开/缩小列的宽度以适应grid的宽度，这样就不会出现水平的滚动条。
            enableRowBody:true,//True表示为在每一数据行的下方加入一个TR的元素
            showPreview:true,
            getRowClass : function(record, rowIndex, p, store){                 
                    return 'x-grid3-row-expanded';
                    // return 'x-grid3-row-collapsed';
            }
        },
        // paging bar on the bottom分页按钮
        bbar: new Ext.PagingToolbar({
            pageSize: 10,//每页条数
            store: azwxstore,//数据
            displayInfo: true,
            displayMsg: '从{0}条到{1}条  总共 {2}条',
            emptyMsg: "没有数据"
        })
    });

    //   加载数据
    azwxstore.load({params:{start:0, limit:10}});
    
    //加载企业主要设备和监测设备
        //主要设备
    var equipmentStore = new Ext.data.JsonStore({
        totalProperty: 'totalCount',
		root: 'result',
        idProperty: 'id',
        remoteSort: true,
        fields: [
            'ename', 
            'xh', 
            'ecount'
        ],
        proxy: new Ext.data.HttpProxy({
            url: '${ctx}/yw-rq-qyzz-equipment!toList.action?acceptNo='+acceptNo
        })
    });
    
    var equitmentgrid = new Ext.grid.GridPanel({
        autoFill : false,
        el:'equitmentDiv',
        collapsible : true,// 是否可以展开 
        autoHeight : true,
        width:750,//宽度
        title:'企业主要设备与检测设备',
        store: equipmentStore,//数据
        trackMouseOver:false,
        disableSelection:true,
        //加载的图标是否显示
        loadMask: true,
        //单行选中
        sm: new Ext.grid.CheckboxSelectionModel ({ singleSelect: false }),//复选框
        // grid columns列
        columns:[
        //new Ext.grid.CheckboxSelectionModel({singleSelect : false}),//复选框
        new Ext.grid.RowNumberer(),//序号
        {
            id: 'ename', 
            header: "设备名称",
            dataIndex: 'ename',
            width:250,
            //align: 'center',
            sortable: false
        },{
            header: "型号",
            dataIndex: 'xh',
            width:250,
            //align: 'center',
            sortable: false
        },{
            header: "数量",
            dataIndex: 'ecount',
            //align: 'center',
            width:250,
            sortable: false
        }],
        // customize view config
        viewConfig: {
            forceFit:true,//True表示为自动展开/缩小列的宽度以适应grid的宽度，这样就不会出现水平的滚动条。
            enableRowBody:true,//True表示为在每一数据行的下方加入一个TR的元素
            showPreview:true,
            getRowClass : function(record, rowIndex, p, store){                 
                    return 'x-grid3-row-expanded';
                    // return 'x-grid3-row-collapsed';
            }
        },
        // paging bar on the bottom分页按钮
        bbar: new Ext.PagingToolbar({
            pageSize: 10,//每页条数
            store: equipmentStore,//数据
            displayInfo: true,
            displayMsg: '从{0}条到{1}条  总共 {2}条',
            emptyMsg: "没有数据"
        })
    });
    //   加载数据
    equipmentStore.load({params:{start:0, limit:10}});
    //equitmentgrid.render('equitmentDiv');
    //azwxgrid.render('azWxpersonDiv');
    //grid.render('zypersondiv');
    //查询数据
    Ext.Ajax.request({
      method:'post',
      url:'${ctx}/yw-rq-qyzz-info!getInfos.action',
      params:{
        'acceptNo': acceptNo
       
      },
      success:function(response){
      	removeAllChild();
		 var result=response.responseText;
		  result = Ext.decode(result);
		 if(result.sbInfo=="exist"){//设备存在数据
		  	// render 显示的层
    		equitmentgrid.render('equitmentDiv');
		 }
		 if(result.safetyPseron=="exist"){
		         // render 显示的层
    		azwxgrid.render('azWxpersonDiv');
		 }
 		if(result.techPeson=="exist"){
		         // render 显示的层
   			 grid.render('zypersondiv');
		 }
      },
      scope:this
    });
    
  }


}
function removeAllChild(){
    var div = document.getElementById("equitmentDiv");
    while(div.hasChildNodes()){
        div.removeChild(div.firstChild);
    }
     var div1 = document.getElementById("azWxpersonDiv");
   	 while(div1.hasChildNodes()) {
        div1.removeChild(div1.firstChild);
    }
     var div2 = document.getElementById("zypersondiv");
    while(div2.hasChildNodes()){
        div2.removeChild(div2.firstChild);
    }
}
		
				
</script>
</head>

<body>
  <table width="750" border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td><table width="100%" border="0" cellspacing="2" cellpadding="2">
          <tr><td height="55" bordercolor="#000000" align="center" style="font-size:22px;">
            <br/><b>燃气燃烧器具安装维修企业资质基本信息</b><br/><br/>
          </td></tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
                <tr>
                  <td height="25" bordercolor="#000000" style="padding: 1px 1px 1px 1px;">
                    申请时间
                    <input isHide="true"  name="ieiDate" style="width:130" value="<s:date name='ieiDate' format="yyyy年MM月dd日"/>" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
                  </td>
                  <td align="right" bordercolor="#000000" style="padding: 1px 1px 1px 1px;">
                    受理编号
                    <input isHide="true" id="acceptNo" name="acceptNo" value="${acceptNo}" type="text" style="width:130" class="readonly_cls" readonly />
                  </td>
                </tr>
            </table>
        </td>
      </tr>
            <tr>
              <td>
              <table width="100%" border="1" cellspacing="0" cellpadding="2" class="tpl_list_ui">
                <tr>
                  <td width="10%" height="0"></td>
                  <td width="10%"></td>
                  <td width="10%"></td>
                  <td width="10%"></td>
                  <td width="10%"></td>
                  <td width="10%"></td>
                </tr>
                <tr>
                  <td bordercolor="#000000" colspan="1" height="25" align="center"><font color="red">*</font>单位名称</td>
                  <td colspan="2" bordercolor="#000000" style="padding: 1px 1px 1px 1px;">
                    <input isHide="true"  id="sqdw_" class="text" name="sqdw" value="${sqdw}" type="text" style="width:190" required="true" onchange="document.getElementById('sqdw_').value=this.value;" />
                    <input isHide="true"  value="..." type="button" style="width:30" onclick="selectQyxx('${templateCode}');"></input>
                  </td>
                   <td colspan="1" height="25" align="center" bordercolor="#000000">法人代表</td>
				    <td colspan="2" height="25" align="center" bordercolor="#000000">
				     <input isHide="true"  class="text"  type="text" style="width:100%" id="fddbr"  name="fddbr" value="${fddbr}" /></td>
                </tr>
                <tr>
                    <td colspan="1" height="25" align="center" bordercolor="#000000">单位地址</td>
				    <td colspan="2" height="25" align="center" bordercolor="#000000">
				    <input isHide="true"  class="text"  type="text" style="width:100%" id="address"  name="address" value="${address}"/></td>
				    <td colspan="1" height="25" align="center" bordercolor="#000000">邮编</td>
				    <td colspan="2" height="25" align="center" bordercolor="#000000">
				    <input isHide="true"  class="text"  type="text" style="width:100%" maxlength="6" id="post"  name="post" value="${post}"/></td>
                </tr>
                <tr>
                    <td height="25" align="center" bordercolor="#000000">电子邮箱</td>
				    <td height="25" align="center" bordercolor="#000000">
				    	 <input isHide="true"  class="text"  type="text" style="width:100%"  id="email"  name="email" value="${email}"/></td>
				    <td height="25" align="center" bordercolor="#000000"><font color="red">*</font>联系人</td>
				    <td height="25" align="center" bordercolor="#000000">
				   	 <input isHide="true"  class="text" name="ywlxr" value="${ywlxr}" id="ywlxr"  type="text" style="width:100%"  required="true" onchange="document.getElementById('ywlxr_').value=this.value;"/>
				    </td>
				    <td height="25" align="center" bordercolor="#000000"><font color="red">*</font>联系电话</td>
				    <td height="25" align="center" bordercolor="#000000">
				   	 <input isHide="true"  class="text" name="ywlxrtel" value="${ywlxrtel}" id="ywlxrtel"  type="text" style="width:100%" maxlength="15" required="true" onchange="document.getElementById('ywlxrtel_').value=this.value;" />
				    </td>				    
                </tr>
                <tr>
                    <td colspan="3" height="25" align="center" bordercolor="#000000">工商营业执照号码</td>
				    <td colspan="3" height="25" align="center" bordercolor="#000000">
				    <input isHide="true"  class="text" name="gszcdjh" value="${gszcdjh}" id="gszcdjh"  type="text" style="width:100%" />
				    </td>
                </tr>
                <tr>
                    <td colspan="1" height="25" align="center" bordercolor="#000000">注册资金</td>
				    <td colspan="2" height="25" align="center" bordercolor="#000000">
				   <input isHide="true"  class="text" name="zczj" value="${zczj}" id="zczj"  type="text" style="width:80%" />
				   </td>
				    <td colspan="1" height="25" align="center" bordercolor="#000000">经营场所面积</td>
				    <td colspan="2" height="25" align="center" bordercolor="#000000">
				     <input isHide="true"  class="text" name="csmj" value="${csmj}" id="csmj"  type="text" style="width:80%" />m<sup>2</sup>
				    </td>
                </tr>
			   <tr>
			    <td colspan="2" height="25" align="center" bordercolor="#000000">技术人员</td>
			    <td colspan="2" height="25" align="center" bordercolor="#000000">持证安装维修工</td>
			    <td colspan="2" height="25" align="center" bordercolor="#000000">企业总人数</td>
			  </tr>
  				<tr>
			    <td colspan="2" bordercolor="#000000">
			    <input isHide="true"  class="text" name="rsJsry" value="${rsJsry}" id="rsJsry"  type="text" style="width:60%;text-align:center;" />（人）
			    </td>
			    <td colspan="2" height="25" align="center" bordercolor="#000000">
			    <input isHide="true"  class="text" name="rsWxg" value="${rsWxg}" id="rsWxg"  type="text" style="width:60%;text-align:center;" /> （人） 
			    </td>
			    <td colspan="2" height="25" align="center" bordercolor="#000000">
			    <input isHide="true"  class="text" name="rsTotal" value="${rsTotal}" id="rsTotal"  type="text" style="width:60%;text-align:center;" />（人）
			    </td>
			  </tr>
			  <tr>
			    <td rowspan="2" colspan="2"  height="25" align="center" bordercolor="#000000"><p>受委托、代理安装</p>
			    <p>维修单位数量</p></td>
			    <td colspan="2" height="25" align="center" bordercolor="#000000">家用燃气器具</td>
			    <td colspan="2" height="25" align="center" bordercolor="#000000">
			    <input isHide="true"  class="text" name="dwslJyrq" value="${dwslJyrq}" id="dwslJyrq"  type="text" style="width:80%" />（家）
			    </td>
			  </tr>
			  <tr>
			    <td colspan="2"  height="25" align="center" bordercolor="#000000">公用燃气器具</td>
			    <td colspan="2"  height="25" align="center" bordercolor="#000000">
			    <input isHide="true"  class="text" name="dwslGyrq" value="${dwslGyrq}" id="dwslGyrq"  type="text" style="width:80%" />（家）
			    </td>
			  </tr>
			  <tr>
			  <td colspan="6" bordercolor="#000000" align="center">
			  <br>
			  <b>企业简介</b>
			  </td>
			  </tr>
			  <tr>
			  <td height="250" colspan="6" bordercolor="#000000">
			  <textarea isHide="true"  class="text" name="qyRemarks" id="qyRemarks"  rows="12" style="width:100%">${qyRemarks}</textarea>
			  </td>
			  </tr>
			    
		          
		          
              </table></td>
            </tr>
          <tr>    <tr height="5">
		           <td  colspan="6" bordercolor="#000000">&nbsp;</td>
		          </tr>
		            <td  colspan="6" bordercolor="#000000">
		              <div name="zypersondiv" id="zypersondiv" title="" class="" style="width:100px;height:50px">
		            
		              </div>
		            </td>
		          </tr>
		             <tr height="10">
		           <td  colspan="6" bordercolor="#000000">&nbsp;</td>
		          </tr>
		            <tr>
		            <td  colspan="6" bordercolor="#000000">
		              <div name="azWxpersonDiv" id="azWxpersonDiv" title="" class="" style="width:100px;height:50px">
		              </div>
		            </td>
		          </tr>
		          <tr height="10">
		           <td  colspan="6" bordercolor="#000000">&nbsp;</td>
		          </tr>
		          <tr>
		            <td  colspan="6" bordercolor="#000000">
		              <div name="equitmentDiv" id="equitmentDiv" title="" class="" style="width:100px;height:50px">
		              </div>
		            </td>
		          </tr>
    </table>
 
    
    </body>
    